<include file="public@storage"/>
<style>
    span {
        color: red;
    }
</style>
</head>
<body>
<div>
    <form class="form-horizontal table" id="form" action="{:url('/storage/Car/addCar')}" method="post" style="margin-top: 5%">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">小车信息</h3>
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label id="a" class="col-md-2 control-label" for="carId">小车编号</label>
                    <div class="col-md-2">
                        <input type="text" name="carId" id="carId" class="form-control" placeholder="必填项">
                        <span id="nameError"></span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label" for="aRow">A类层数</label>
                    <div class="col-md-2">
                        <input type="text" name="aRow" id="aRow" class="form-control" placeholder="必填项">
                        <span id="aRowError"></span>
                    </div>
                    <label class="col-md-2 control-label" for="aCount">每层站位数</label>
                    <div class="col-md-2">
                        <input type="text" name="aCount" id="aCount" class="form-control" placeholder="必填项">
                        <span id="aCountError"></span>
                    </div>
                    <div class="col-md-2 control-label">
                        <label for="aisDouble">是否双面</label>
                    </div>
                    <div class="col-md-2">
                        <select class="form-control" id="aisDouble" name="aisDouble">
                            <option value="yes" selected>双面</option>
                            <option value="no">单面</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label" for="bRow">B类层数</label>
                    <div class="col-md-2">
                        <input type="text" name="bRow" id="bRow" class="form-control" value="0" placeholder="必填项">
                        <span id="bRowError"></span>
                    </div>
                    <label class="col-md-2 control-label" for="bCount">每层站位数</label>
                    <div class="col-md-2">
                        <input type="text" name="bCount" id="bCount" class="form-control" value="0" placeholder="必填项">
                        <span id="bCountError"></span>
                    </div>
                    <div class="col-md-2 control-label">
                        <label for="bisDouble">是否双面</label>
                    </div>
                    <div class="col-md-2">
                        <select class="form-control" id="bisDouble" name="bisDouble">
                            <option value="yes" selected>双面</option>
                            <option value="no">单面</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label" for="cRow">C类层数</label>
                    <div class="col-md-2">
                        <input type="text" name="cRow" id="cRow" class="form-control" value="0" placeholder="必填项">
                        <span id="cRowError"></span>
                    </div>
                    <label class="col-md-2 control-label" for="cCount">每层站位数</label>
                    <div class="col-md-2">
                        <input type="text" name="cCount" id="cCount" class="form-control" value="0" placeholder="必填项">
                        <span id="cCountError"></span>
                    </div>
                    <div class="col-md-2 control-label">
                        <label for="cisDouble">是否双面</label>
                    </div>
                    <div class="col-md-2">
                        <select class="form-control" id="cisDouble" name="cisDouble">
                            <option value="no">单面</option>
                            <option value="yes" selected>双面</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="form-group text-center">
                <button class="mui-btn mui-btn--raised mui-btn--primary" id="submit">添加</button>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <button class="mui-btn mui-btn--raised mui-btn--primary" type="button" onclick="history.go(-1)">取消</button>
            </div>
        </div>
    </form>
    <iframe name="form" id="hidden_frame" style="display:none"></iframe>
</div>
</body>
<script src="__STATIC__/storage/js/storage/edit.js"></script>
<script src="__STATIC__/storage/js/storage/check.js"></script>
<script>
    window.onload = function() {
        var url = "{:url('/storage/Car/getCarMaxId')}";
        getCarInfo(url);
    };

    $('#carId').change(function () {
        var url = "{:url('/storage/Car/checkCarId')}";
        checkId(url);
    });

</script>
</html>